package com.flame.user.mapper;

import java.util.List;
import java.util.Set;

import com.flame.user.controller.vo.UserRoleVo;
import com.flame.user.entity.UserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * flame_user_role 用户角色表
 *
 * @author 吴欣童
 * @since 2022-12-14 16:23:30
 */
@Mapper
public interface UserRoleMapper {

    List<UserRole> page(UserRoleVo userRoleVo);

    void insert(UserRole userRole);

    void updateById(UserRole userRole);

    void deleteById(@Param("userId") String userId, @Param("roleCode") String roleCode);

    UserRole selectById(@Param("userId") String userId, @Param("roleCode") String roleCode);

    void deleteByUserId(@Param("userId") String userId);

    Set<String> listRoleByUserId(@Param("userId") String userId);

    Set<String> listUserByRoleCode(@Param("roleCode") String roleCode);
}